package com.app.controller;

import com.app.model.response.RetStatus;
import com.app.service.ApprovalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Lichaojie on 2017/3/13. It's a beautiful day.
 */
@RequestMapping(value = "/approval")
@RestController
public class ApprovalController {

    @Autowired
    private ApprovalService approvalService;

    @RequestMapping(value = "/doApproval")
    public RetStatus doApproval(@RequestBody String parameter){
        return approvalService.doApproval(parameter);
    }

    @RequestMapping(value = "/getApproval")
    public RetStatus getApproval(@RequestBody String parameter){
        return approvalService.getApproval(parameter);
    }

    @RequestMapping(value = "/cancelApproval")
    public RetStatus cancelApproval(@RequestBody String parameter){
        return approvalService.cancelApproval(parameter);
    }


}